package com.enjoyor.soa.traffic.ping.efoms;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.enjoyor.soa.traffic.frame.configure.AopConfig;
import com.enjoyor.soa.traffic.frame.configure.DubboConfig;
import com.enjoyor.soa.traffic.frame.configure.ExceptionConfig;
import com.enjoyor.soa.traffic.frame.configure.LoggerConfig;
import com.enjoyor.soa.traffic.frame.configure.MyBatisConfig;
import com.enjoyor.soa.traffic.frame.configure.UtilConfig;

/**
 * @ClassNamePingServerApplication
 * @Description TODO
 * @Author ZSY
 * @Date 2019/1/30 14:34
 * @Version 1.0
 **/
@SpringBootApplication
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@EnableScheduling
@EnableAsync
@ComponentScan(basePackages = {"com.enjoyor.soa.traffic.core.ping","com.enjoyor.soa.traffic.ping.efoms"})
@Import({ AopConfig.class, ExceptionConfig.class, MyBatisConfig.class,
    UtilConfig.class, LoggerConfig.class, DubboConfig.class })
public class PingServerApplication {
    public static ConfigurableApplicationContext context;

    public static void main(String[] args) {
        context=SpringApplication.run(PingServerApplication.class, args);
        //context.addApplicationListener(new AnalysisListenerServer());
    }
}
